package com.roamer.audition.server.query;

import com.roamer.audition.server.entity.AuditionRecord;
import com.roamer.audition.server.query.base.BaseQuery;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.data.jpa.domain.Specification;

import java.util.List;

/**
 * 面试计划 查询对象
 *
 * @author roamer
 * @version V1.0
 * @date 2019/8/26 1:14 下午
 */
@ApiModel("面试计划查询Query")
@EqualsAndHashCode(callSuper = true)
@Data
public class AuditionRecordSimpleQuerySpecification extends BaseQuery<AuditionRecord> {
    private static final long serialVersionUID = -3951402850295434514L;

    @ApiModelProperty(value = "开始日期区间起始", notes = "大于等于")
    private Long beginTimeFrom;

    @ApiModelProperty(value = "开始日期区间终止", notes = "小于等于")
    private Long beginTimeTo;

    @ApiModelProperty(value = "进行状态", allowableValues = "range[0, 2]")
    private List<Byte> statusList;

    @Override
    public Specification<AuditionRecord> toSpec() {
        return super.toSpecWithAnd();
    }

}
